<template>
    <div class="app-container h-auto min-h-full">
        <y-form ref="formRef" :options="formOptions"></y-form>
    </div>
</template>

<script>
export default {
    data() {
        return {
            field: 'c92cb941-7b9b-4d76-b669-8c4084b8adf91739352438072',
            formOptions: {
                titleWidth: 120,
                items: [
                    {
                        field: 'upload', title: '上传', itemRender: {
                            name: 'ZUpload',
                            props: {
                                module: 'WebFile',
                            },
                            events: {
                                success: (e) => {
                                    console.log(e);
                                }
                            }
                        }
                    },
                    {
                        align: 'center', span: 24, itemRender: {
                            name: 'VxeButtonGroup',
                            options: [
                                { content: '重置', type: 'reset' },
                                { content: '提交', type: 'submit', status: 'primary' }
                            ]
                        }
                    }
                ]
            }
        }
    },
    mounted() {
        this.$refs.formRef.setData({
            upload: 'c92cb941-7b9b-4d76-b669-8c4084b8adf91739352438072'
        })
    }
}
</script>